﻿using LM.Negocio;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using LM.Negocio.Objetos;

namespace LM.Repositorios.Maps
{
    public class VagaMap : EntityTypeConfiguration<Vaga>
    {
        public VagaMap()
        {
            this.HasKey(m => m.Id);
            this.Property(m => m.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("Id");
            
            this.Property(m => m.Codigo).HasColumnName("Codigo").IsRequired();
            this.Property(m => m.Numero).HasColumnName("Numero").IsRequired();
            this.Property(m => m.TipoDeVaga).HasColumnName("TipoDeVaga").IsRequired();
            
            this.ToTable("VAGA");
        }
    }
}
